/**
 * @copyright Copyright (c) 2023..
 *
 * @file    collect_config.h
 * @brief   描述 拉取云端配置接口
 * @author  HC(202206728@any3.com)
 * @version 1.0
 * @date    2023-09-27
 */
#ifndef COLLECT_CONFIG_H
#define COLLECT_CONFIG_H

#include <tuple>
#include <string>
#include <functional>
#include "tool.h"
#include "timer.hpp"
// #include "common_opr_http.h"
#include "common_opr_all.h"

namespace DcAdr
{
    //从云端拉取配置文件
    class CollectConfig
    {
    public:
        static CollectConfig &getInstance();
        void init();
        void getConfigAgain();
        CollectConfig();
        ~CollectConfig();
    private:
        bool getConfig();
        
        bool getConfigFromCloud();
        CommonOprHttp m_httpCommon;
        Timer *m_timer_3{nullptr};                             //定时器,重新拉取配置
    };
} // namespace DcAdr

#endif // COLLECT_CONFIG_H
